#include "Class.h"
#include "Student.h"
#include "Staff.h"
#include "Teacher.h"
void main()
{
	Class cl;
	People *a, *b, *c, *d, *e;
	//Add 5 students
	float* sA = new float[1];
	sA[0]=3.0f;
	float* sB = new float[2];
	sB[0]=8;
	sB[1]=8;;
	float* sC =new float[3];
	sC[0]=5;
	sC[1]=2;
	sC[2]=10;
	float* sD = new float[5];
	sD[0]=5;
	sD[1]=2;
	sD[2]=10;
	sD[3]=9;
	sD[4]=10;
	float* sE = new float[5];
	sE[0]=1;
	sE[1]=8;
	sE[2]=10;
	sE[3]=9;
	sE[4]=10;
	a = new Student("Student A", Date(1,1,1,1991), 1, 8, 1, sA);
	b = new Staff("Staff B", Date(1,1,1,1981), 2, 3, Date(1,1,1,2001), 3);	
	c = new Student("Student C", Date(3,1,1,1993), 3, 3, 3, sC);
	d = new Student("Student D", Date(4,1,1,1994), 4, 7, 4, sD);
	e = new Staff("Staff E", Date(1,1,1,1984), 5, 5, Date(1,1,1,2001), 1);	

	cl.AddPeople(a);
	cl.AddPeople(b);
	cl.AddPeople(c);
	cl.AddPeople(d);	
	cl.AddPeople(e);

	//Add 5 staffs
	a = new Staff("Staff A", Date(1,1,1,1980), 1, 1, Date(1,1,1,2000), 1);	
	b = new Student("Student B", Date(2,1,1,1992), 2, 5, 2, sB);
	c = new Staff("Staff C", Date(1,1,1,1982), 3, 2, Date(1,1,1,2002), 1);	
	d = new Staff("Staff D", Date(1,1,1,1983), 4, 4, Date(1,1,1,2003), 2);	
	e = new Student("Student E", Date(5,1,1,1995), 5, 5, 5, sE);

	cl.AddPeople(a);
	cl.AddPeople(b);
	cl.AddPeople(c);
	cl.AddPeople(d);	
	cl.AddPeople(e);

	//Add 5 staffs
	a = new Teacher("Teacher A", Date(1,1,1,1970), 1, 4, Subject::ENGLISH, Subject::MATHS);
	b = new Teacher("Teacher B", Date(1,1,1,1971), 2, 2, Subject::MATHS, Subject::MATHS);
	c = new Teacher("Teacher C", Date(1,1,1,1972), 3, 3, Subject::PHYS, Subject::ENGLISH);
	d = new Teacher("Teacher D", Date(1,1,1,1973), 4, 1, Subject::ENGLISH, Subject::MATHS);
	e = new Teacher("Teacher E", Date(1,1,1,1974), 5, 5, Subject::ENGLISH, Subject::PHYS);

	cl.AddPeople(a);
	cl.AddPeople(b);
	cl.AddPeople(c);
	cl.AddPeople(d);	
	cl.AddPeople(e);

	cl.PrintInfo();
	cl.sort();
	cout << "=============================\n========================\n===================="<<endl;
	cl.PrintInfo();
	//cl.PrintStudentInfo(0);
	cl.saveToFile("Test.txt");
}